package jackey.tool.sql;

import java.sql.ResultSet;
import java.sql.SQLException;

public class DBTest {
	
	public static void main(String[] args) {
		String sql = "select * from h_members";
		DBConnection dbcon = null;
		ResultSet rs = null;
		try {
			dbcon = new DBConnection("db", sql);
			rs = dbcon.executeQuery();
			while(rs.next()) {
				System.out.println(rs.getString(0));
			}
		} catch (SQLException e) {
			e.printStackTrace();
		} finally {
			if(dbcon != null)
				dbcon.free();
			if(rs != null)
				try {
					rs.close();
				} catch (SQLException e) {
					e.printStackTrace();
				}
		}
	}
}
